<template>
  <div class="wrapper" style="margin-bottom: -49px">
    <h2 class="logo">
      <img :src="logo.pic" alt="" />
    </h2>
    <van-tabs v-model="active">
      <van-tab title="密码登录" name="login">
        <PassLogin></PassLogin>
      </van-tab>
      <van-tab title="验证码登录" name="loginsms">
        <CodeLogin></CodeLogin>
      </van-tab>
    </van-tabs>
    <div class="ptext">
      <p class="left" @click="gotowhere('forgotpass')">忘记密码</p>
      <p class="right" @click="gotowhere('register')">还没有账号,立即注册</p>
    </div>
  </div>
</template>
<script>
import PassLogin from './PassLogin'
import CodeLogin from './CodeLogin'
import obj from '@/utils/mixin'

export default {
  mixins: [obj],
  components: {
    PassLogin,
    CodeLogin
  },
  data () {
    return {
      active: 'login',
      logo: { pic: require('@/assets/logo.png') }
    }
  },
  methods: {
    onSubmit () {},
    gotowhere (name) {
      this.$router.push({ name })
    }
  }
}
</script>
<style lang="scss" scoped>
.wrapper {
  background-color: #fff;
  .logo {
    overflow: hidden;
    text-align: center;
    img {
      margin: 79px auto 40px;
      height: 60px;
      line-height: 60px;
    }
  }
}
.ptext {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  padding: 10px 10px;
}
</style>
